1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module adw.TabPage;
26 
27 private import adw.c.functions;
28 public  import adw.c.types;
29 private import gio.IconIF;
30 private import glib.Str;
31 private import glib.c.functions;
32 private import gobject.ObjectG;
33 private import gtk.Widget;
34 
35 
36 /**
37  * An auxiliary class used by [class@TabView].
38  */
39 public class TabPage : ObjectG
40 {
41 	/** the main Gtk struct */
42 	protected AdwTabPage* adwTabPage;
43 
44 	/** Get the main Gtk struct */
45 	public AdwTabPage* getTabPageStruct(bool transferOwnership = false)
46 	{
47 		if (transferOwnership)
48 			ownedRef = false;
49 		return adwTabPage;
50 	}
51 
52 	/** the main Gtk struct as a void* */
53 	protected override void* getStruct()
54 	{
55 		return cast(void*)adwTabPage;
56 	}
57 
58 	/**
59 	 * Sets our main struct and passes it to the parent class.
60 	 */
61 	public this (AdwTabPage* adwTabPage, bool ownedRef = false)
62 	{
63 		this.adwTabPage = adwTabPage;
64 		super(cast(GObject*)adwTabPage, ownedRef);
65 	}
66 
67 
68 	/** */
69 	public static GType getType()
70 	{
71 		return adw_tab_page_get_type();
72 	}
73 
74 	/**
75 	 * Gets the child of @self.
76 	 *
77 	 * Returns: the child of @self
78 	 *
79 	 * Since: 1.0
80 	 */
81 	public Widget getChild()
82 	{
83 		auto __p = adw_tab_page_get_child(adwTabPage);
84 
85 		if(__p is null)
86 		{
87 			return null;
88 		}
89 
90 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) __p);
91 	}
92 
93 	/**
94 	 * Gets the icon of @self.
95 	 *
96 	 * Returns: the icon of @self
97 	 *
98 	 * Since: 1.0
99 	 */
100 	public IconIF getIcon()
101 	{
102 		auto __p = adw_tab_page_get_icon(adwTabPage);
103 
104 		if(__p is null)
105 		{
106 			return null;
107 		}
108 
109 		return ObjectG.getDObject!(IconIF)(cast(GIcon*) __p);
110 	}
111 
112 	/**
113 	 * Gets whether the indicator of @self is activatable.
114 	 *
115 	 * Returns: whether the indicator is activatable
116 	 *
117 	 * Since: 1.0
118 	 */
119 	public bool getIndicatorActivatable()
120 	{
121 		return adw_tab_page_get_indicator_activatable(adwTabPage) != 0;
122 	}
123 
124 	/**
125 	 * Gets the indicator icon of @self.
126 	 *
127 	 * Returns: the indicator icon of @self
128 	 *
129 	 * Since: 1.0
130 	 */
131 	public IconIF getIndicatorIcon()
132 	{
133 		auto __p = adw_tab_page_get_indicator_icon(adwTabPage);
134 
135 		if(__p is null)
136 		{
137 			return null;
138 		}
139 
140 		return ObjectG.getDObject!(IconIF)(cast(GIcon*) __p);
141 	}
142 
143 	/**
144 	 * Gets whether @self is loading.
145 	 *
146 	 * Returns: whether @self is loading
147 	 *
148 	 * Since: 1.0
149 	 */
150 	public bool getLoading()
151 	{
152 		return adw_tab_page_get_loading(adwTabPage) != 0;
153 	}
154 
155 	/**
156 	 * Gets whether @self needs attention.
157 	 *
158 	 * Returns: whether @self needs attention
159 	 *
160 	 * Since: 1.0
161 	 */
162 	public bool getNeedsAttention()
163 	{
164 		return adw_tab_page_get_needs_attention(adwTabPage) != 0;
165 	}
166 
167 	/**
168 	 * Gets the parent page of @self.
169 	 *
170 	 * Returns: the parent page
171 	 *
172 	 * Since: 1.0
173 	 */
174 	public TabPage getParent()
175 	{
176 		auto __p = adw_tab_page_get_parent(adwTabPage);
177 
178 		if(__p is null)
179 		{
180 			return null;
181 		}
182 
183 		return ObjectG.getDObject!(TabPage)(cast(AdwTabPage*) __p);
184 	}
185 
186 	/**
187 	 * Gets whether @self is pinned.
188 	 *
189 	 * Returns: whether @self is pinned
190 	 *
191 	 * Since: 1.0
192 	 */
193 	public bool getPinned()
194 	{
195 		return adw_tab_page_get_pinned(adwTabPage) != 0;
196 	}
197 
198 	/**
199 	 * Gets whether @self is selected.
200 	 *
201 	 * Returns: whether @self is selected
202 	 *
203 	 * Since: 1.0
204 	 */
205 	public bool getSelected()
206 	{
207 		return adw_tab_page_get_selected(adwTabPage) != 0;
208 	}
209 
210 	/**
211 	 * Gets the title of @self.
212 	 *
213 	 * Returns: the title of @self
214 	 *
215 	 * Since: 1.0
216 	 */
217 	public string getTitle()
218 	{
219 		return Str.toString(adw_tab_page_get_title(adwTabPage));
220 	}
221 
222 	/**
223 	 * Gets the tooltip of @self.
224 	 *
225 	 * Returns: the tooltip of @self
226 	 *
227 	 * Since: 1.0
228 	 */
229 	public string getTooltip()
230 	{
231 		return Str.toString(adw_tab_page_get_tooltip(adwTabPage));
232 	}
233 
234 	/**
235 	 * Sets the icon of @self.
236 	 *
237 	 * Params:
238 	 *     icon = the icon of @self
239 	 *
240 	 * Since: 1.0
241 	 */
242 	public void setIcon(IconIF icon)
243 	{
244 		adw_tab_page_set_icon(adwTabPage, (icon is null) ? null : icon.getIconStruct());
245 	}
246 
247 	/**
248 	 * Sets whether the indicator of @self is activatable.
249 	 *
250 	 * Params:
251 	 *     activatable = whether the indicator is activatable
252 	 *
253 	 * Since: 1.0
254 	 */
255 	public void setIndicatorActivatable(bool activatable)
256 	{
257 		adw_tab_page_set_indicator_activatable(adwTabPage, activatable);
258 	}
259 
260 	/**
261 	 * Sets the indicator icon of @self.
262 	 *
263 	 * Params:
264 	 *     indicatorIcon = the indicator icon of @self
265 	 *
266 	 * Since: 1.0
267 	 */
268 	public void setIndicatorIcon(IconIF indicatorIcon)
269 	{
270 		adw_tab_page_set_indicator_icon(adwTabPage, (indicatorIcon is null) ? null : indicatorIcon.getIconStruct());
271 	}
272 
273 	/**
274 	 * Sets wether @self is loading.
275 	 *
276 	 * Params:
277 	 *     loading = whether @self is loading
278 	 *
279 	 * Since: 1.0
280 	 */
281 	public void setLoading(bool loading)
282 	{
283 		adw_tab_page_set_loading(adwTabPage, loading);
284 	}
285 
286 	/**
287 	 * Sets whether @self needs attention.
288 	 *
289 	 * Params:
290 	 *     needsAttention = whether @self needs attention
291 	 *
292 	 * Since: 1.0
293 	 */
294 	public void setNeedsAttention(bool needsAttention)
295 	{
296 		adw_tab_page_set_needs_attention(adwTabPage, needsAttention);
297 	}
298 
299 	/**
300 	 * Sets the title of @self.
301 	 *
302 	 * Params:
303 	 *     title = the title of @self
304 	 *
305 	 * Since: 1.0
306 	 */
307 	public void setTitle(string title)
308 	{
309 		adw_tab_page_set_title(adwTabPage, Str.toStringz(title));
310 	}
311 
312 	/**
313 	 * Sets the tooltip of @self.
314 	 *
315 	 * Params:
316 	 *     tooltip = the tooltip of @self
317 	 *
318 	 * Since: 1.0
319 	 */
320 	public void setTooltip(string tooltip)
321 	{
322 		adw_tab_page_set_tooltip(adwTabPage, Str.toStringz(tooltip));
323 	}
324 }